package com.gidgabs.dto;

import com.gidgabs.modules.entity.TbAddressEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("收货地址信息")
public class TbAddressDto {

    //
    @ApiModelProperty("id")
    private Integer id;
    //收货地址编码
    @ApiModelProperty("收货地址编码")
    private String thingCode;
    //收货人姓名
    @ApiModelProperty("收货人姓名")
    private String name;
    //收货人电话号码
    @ApiModelProperty("收货人电话号码")
    private String tel;
    //省id
    @ApiModelProperty("省id")
    private Integer provinceid;
    //市id
    @ApiModelProperty("市id")
    private Integer cityid;
    //区id
    @ApiModelProperty("区id")
    private Integer districtid;
    //省名称
    @ApiModelProperty("省名称")
    private String provinceName;
    //市名称
    @ApiModelProperty("市名称")
    private String cityName;
    //区名称
    @ApiModelProperty("区名称")
    private String districtName;
    //详细地址
    @ApiModelProperty("详细地址")
    private String detailed;
    //0:代表默认，1:代表非默认
    @ApiModelProperty("0:代表默认，1:代表非默认")
    private Integer isDefault;
    //用户编码
    @ApiModelProperty("用户编码")
    private Integer userId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getThingCode() {
        return thingCode;
    }

    public void setThingCode(String thingCode) {
        this.thingCode = thingCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public Integer getProvinceid() {
        return provinceid;
    }

    public void setProvinceid(Integer provinceid) {
        this.provinceid = provinceid;
    }

    public Integer getCityid() {
        return cityid;
    }

    public void setCityid(Integer cityid) {
        this.cityid = cityid;
    }

    public Integer getDistrictid() {
        return districtid;
    }

    public void setDistrictid(Integer districtid) {
        this.districtid = districtid;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getDetailed() {
        return detailed;
    }

    public void setDetailed(String detailed) {
        this.detailed = detailed;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public Integer getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public TbAddressEntity toEntity(){
        TbAddressEntity tbAddressEntity = new TbAddressEntity();
        tbAddressEntity.setName(this.getName());
        tbAddressEntity.setId(this.getId());
        tbAddressEntity.setThingCode(this.getThingCode());
        tbAddressEntity.setTel(this.getTel());
        tbAddressEntity.setProvinceid(this.getProvinceid());
        tbAddressEntity.setCityid(this.getCityid());
        tbAddressEntity.setDistrictid(this.getDistrictid());
        tbAddressEntity.setProvinceName(this.getProvinceName());
        tbAddressEntity.setCityName(this.getCityName());
        tbAddressEntity.setDistrictName(this.getDistrictName());
        tbAddressEntity.setDetailed(this.getDetailed());
        tbAddressEntity.setIsDefault(this.getIsDefault());
        tbAddressEntity.setUserId(this.getUserId());
        return tbAddressEntity;
    }
}
